package tel.controller;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import tel.bean.Admin;
import tel.service.AdminService;
import tel.service.impl.AdminServiceImpl;

@Controller
public class AdminController {
	@Autowired
	AdminService adminService;
	
	@RequestMapping("/login")
	public String login(Admin admin) {
		Admin login = adminService.login(admin);
		if(login == null) {
			System.out.println("失败");
			return "login";
		}
		return "index";
	}
}
